#ifndef VIDEO_INCLUDE
#define VIDEO_INCLUDE

/**
* Class provides methods for video processing.
*************************************************************************
* History:
* Original version: Thiago Mizutani & Fabricio Lopes de Souza
*   c.f. http://code.google.com/p/m-fit/
* 26/05/2011 - Sang L. Phan
*   + Translate docs into English
*   + Remove unused code that works with QT Nokia framework
*   + Modify for experiments
************************************************************************/
class Video
{

private:
    /**
    * Name of video
    */
    char name[300+1];


    /**
    * Path to video file
    */
    char path[300+1];


    /**
    * video codec.
    */
    double codec;

    double framesHeight;

    double framesWidth;

    double framePos;

    double framesTotal;

    double systemColor;

    /**
    * number of frames per second
    */
    double fps;

    /**
    * Open a new video from a file
    */
    CvCapture* open(char *vdoSrc); 

public:

    CvRect ROI;

    void resetROI();

    char* getName();
    char* getPath();

    /**
    * 
    */
    CvCapture* data;

    Video(char *filename_cy);
    ~Video();

    /**
    * Get next frame
    */
    Frame* getNextFrame();

    /**
    * Get previous frame
    */
    Frame* getPreviousFrame();

    /**
    * Seek frame to particular location
    **/
    int seekFrame(unsigned long posFrame);

    /**
    * Get current Frame
    */
    Frame* getCurrentFrame();


    double getFramesTotal();

    // current position in frame number
    double getCurrentPosition();

    // Milisecond
    long getCurrentPosMsec();


    double getFramesWidth();
    double getFramesHeight();
    double getCodec();
    void updatePos();
    //	double getFramePos();

    double getFPS();
    void removeWide();
    void removeBorder();
};
#endif
